package com.alfred.mall.user.biz.service;

import com.alfred.mall.user.api.UserService;
import com.alfred.mall.user.api.bo.UserBO;
import com.alfred.mall.user.biz.convert.UserConvert;
import com.alfred.mall.user.biz.dao.UserMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public UserBO getUserById(Integer userId) {
        return UserConvert.INSTANCE.convert(userMapper.selectById(userId));
    }
}
